package com.code.splider.quartz;



import java.util.ResourceBundle;

import org.springframework.beans.factory.annotation.Autowired;

import com.code.splider.service.HttpClientService;

public class MyJob {
	
	@Autowired
	private HttpClientService httpClientService;
	
	public void scoreWork() {  
//		httpClientService.beginGrap("http://localhost:8081/splider/score/save");
		httpClientService.beginGrap(this.getContent("score"));
    }  
	
    public void scorePanluWork() {  
		httpClientService.beginGrap(this.getContent("scorePanlu"));
    } 
	
	public void eventWork() {  
		//httpClientService.beginGrap("http://localhost:8081/splider/event/save");
	httpClientService.beginGrap(this.getContent("event"));
    } 
	
	public void eventDetailWork() {  
		//httpClientService.beginGrap("http://localhost:8081/splider/event/save");
		httpClientService.beginGrap(this.getContent("eventDetail"));
	}  
	
	public void diaryWork() {  
//		httpClientService.beginGrap("http://localhost:8081/splider/diary/save");
		httpClientService.beginGrap(this.getContent("diary"));
    } 
	
	public void cornerWork() {  
//		httpClientService.beginGrap("http://localhost:8081/splider/corner/save");
		httpClientService.beginGrap(this.getContent("corner"));
    } 
	
	public void panluWork() {  
		httpClientService.beginGrap(this.getContent("panlu"));
	}
	
	private String getContent(String key){
		ResourceBundle resources = ResourceBundle.getBundle("application");
		return resources.getString(key).trim();
	}
	
	
	
}
